/**
 * Created by Administrator on 2016/8/1.
 */
var userDao = require('../dao/userDao');
var uuid = require('node-uuid');


//个人信息验证
exports.usermessage = function (userid,callback) {
    userDao.usermessage(userid,function (err, data) {
        callback(err, data);
    })
};

//添加用户
exports.adduser = function (params,callback) {
    var obj = {
        id: uuid.unparse(uuid.v4(null, new Buffer(32), 0)),
        username:params.username,
        mobile:params.mobile,
        createAt: new Date(),
        updateAt:new  Date(),
        status: 1
    };
    userDao.adduser(obj,function (err, data) {
        callback(err, data);
    })
};